#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFileDialog>
#include <QMessageBox>

#include "videoTestLib.h"

#include "mainimagescene.h"
#include "qprocessthread.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();


signals:
    void showResultSig();
    void sendImage(QImage image);
    void beginProcessSig();

private slots:
    void on_pushButton_FrameRate_clicked();

    void on_pushButton_ColorTest_clicked();

    void on_pushButton_SFRTest_clicked();

    void on_pushButton_Comfirm_clicked();

    void on_pushButton_Exit_clicked();

    void on_pushButton_UserGuide_clicked();

    void on_pushButton_EmailAuthor_clicked();

    void on_pushButton_ResetROI_clicked();

    void on_pushButton_CancelROI_clicked();

    void videoEndSlot();

    void on_pushButton_StepChartTest_clicked();

private:
    bool openFile(bool videoFlag, int mode);
    bool setAction();

protected:
    void paintEvent(QPaintEvent *event);

private:
    Ui::MainWindow *ui;
    QGraphicsView *viewPtr;
    QLabel *labelPtr;
    bool mousePressedFlag;
    QPointF pressPoint;
    bool startDrawROIFlag;
    bool labeledFlag;
    int imageWidth;
    int imageHeight;
    QThread processTheard;
    QProcessThread processThreadClass;
    MainImageScene mainScene;
    int functionMode;
    int testMode;
};

#endif // MAINWINDOW_H
